Skip to content

chore: playwright#6562

Merged
kyle-ssg merged 285 commits intomainfrom
chore/playwright
Mar 4, 2026
Merged

chore: playwright#6562
kyle-ssg merged 285 commits intomainfrom
chore/playwright

Conversation

@kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Jan 20, 2026

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Playwright Test Improvements

Faster Tests

  • Inputs are really fast compared to TestCafe
  • Tests are passing in CI around 2m30s vs ~4m

Better Local Development

  • Tests are re-runable via ui (you'll have to run npm run test:teardown before clicking play again)
  • Tests come with videos and clickable traces (these get uploaded from GitHub on failures too)
  • Tests can be ran very quickly and can be repeated (E2E_REPEAT=x) and exit on first failed test (E2E_RETRIES=0)
image

main_large

Added Claude Commands

  • /e2e - Run all tests (OSS + Enterprise)
  • /e2e-oss - Run OSS tests, auto-fix failures, re-run until passing
  • /e2e-ee - Run Enterprise tests, auto-fix failures, re-run until passing
  • /e2e-create - Create a new test following existing patterns

Note: You can have the tests repeat to guarantee no flakiness

  • /e2e 5 → Runs all tests with E2E_REPEAT=5 (runs once, then 5 more times if passing)
  • /e2e-oss 5 → Same for OSS tests only
  • /e2e-ee 5 → Same for enterprise tests only
image

HTML Reports

  • Interactive dashboard with search/filter
  • Test timeline and duration metrics
  • Detailed error messages with stack traces

e.g. this is a downloaded report, we can access reports of failures as well as videos / interactive traces.

image image image image

CI/CD Features

GitHub Integration

  • Sticky PR comments with failure summaries
  • Direct links to ZIP artifacts containing:
  • HTML report
  • Videos of failures
  • Interactive traces
  • Screenshots
  • Automatic artifact cleanup
image image

How did you test this code?

  • No code changes, all e2e refactoring
  • Run local image and keep track of any failures
image

kyle-ssg and others added 30 commits September 30, 2025 18:42
Co-authored-by: Zaimwa9 <wadii.zaim@flagsmith.com>
# Conflicts:
#	frontend/web/components/pages/UserPage.tsx
kyle-ssg and others added 2 commits February 25, 2026 11:02
The CI workflow sets E2E_RETRIES=2 but the Makefile only forwarded
E2E_CONCURRENCY to the container, so retries defaulted to 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
@talissoncosta
Copy link
Contributor

talissoncosta commented Feb 27, 2026

Great work on the Playwright migration @kyle-ssg ! The DX improvements (trace viewer, DOM snapshots, interactive UI mode) are huge.

I tested extensively using both /e2e and make test. Here are my findings:

Test Results

Using make test with --grep @oss:

10 passed ✅

Using make test with --grep @enterprise:

4 passed, 2 failed ❌ (change-request-test, roles-test)

Using /e2e (all tests):

14 passed, 2 failed ❌ (same tests)

Observations

1. Enterprise tests fail against OSS API

Two tests consistently fail locally:

  • change-request-test → POST /create-change-request/ returns 405
  • roles-test → POST /roles/ returns 405

Root cause: docker-compose-e2e-tests.yml uses target: oss-api, but these tests require enterprise-only endpoints.

2. Concurrency mismatch

  • .claude/commands/e2e.md uses E2E_CONCURRENCY=20 → causes browser crashes locally
  • Makefile uses E2E_CONCURRENCY=3 → stable

3. waitForTimeout() anti-patterns

Found instances in e2e-helpers.playwright.ts, though e2e.md states "NEVER use page.waitForTimeout()".

CI handles OSS/Enterprise correctly

Looking at platform-pull-request.yml:

Job API Image Tests
run-e2e-tests oss-api --grep @oss
run-e2e-tests-private-cloud private-cloud-unified --grep "@oss|@enterprise"

Can't build private-cloud locally

Tried changing to target: private-cloud-unified but build fails - requires github_private_cloud_token for private repos.

Questions

  1. Is --grep @oss the intended way to run tests locally?

  2. Should docs/commands default to OSS-only tests for local development?

  3. Should we align concurrency settings? (Makefile uses 3, /e2e command uses 20)


None of these are blockers. The PR is really good and ready to merge! I just wanted to raise these observations for awareness and to clarify the expected local development workflow.

talissoncosta
talissoncosta previously approved these changes Feb 27, 2026
Zaimwa9
Zaimwa9 previously approved these changes Mar 2, 2026
Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀

kyle-ssg added 3 commits March 4, 2026 09:47
# Conflicts:
#	frontend/e2e/tests/flag-tests.ts
#	frontend/package-lock.json
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API chore front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate E2E tests to playwright

3 participants